// 圈子接口
import config from "./config";

var domain = config.getDomain;

var pageCount = config.getPageCount;

var DUIXIN_API =  domain + '/index.php?v=1&appid='+config.getAPPID+'&appsecret='+config.getAPPSECRET+'&';

export default  {
	// 判断加入圈子
	getJiaquan_panduan(uid,code) {
		if(uid=='' || code==''){
			var url = DUIXIN_API + '&s=quan&c=jiaquan&m=jiaquan_panduan';
		} else {
			var url = DUIXIN_API + '&s=member&app=quan&c=jiaquan&m=jiaquan_panduan&api_auth_uid='+uid+'&api_auth_code='+code;
		}
		return url;
	},
	// 圈子信息
	getQuan(){
		var url = DUIXIN_API + '&s=quan&c=quan&m=index';
		return url;

	},
	// 圈子列表
	getQuan_list(obj) {
		var url = DUIXIN_API + '&s=quan&c=liebiao&pagesize=' + pageCount + '&page=' + obj.page;
		if (obj.categories != 0) {
		  url += '&catid=' + obj.categories;
		} else if (obj.search != '') {
		  url += '&keyword=' + encodeURIComponent(obj.search);
		}
		if (obj.uid) {
		  url += '&api_auth_uid=' + obj.uid;
		}
		if (obj.wouid) {
		  url += '&wouid='+ obj.uid;
		}
		if (obj.jiauid) {
		  url += '&jiauid='+ obj.uid;
		}
		if (obj.keycode) {
		  url += '&api_auth_code=' + obj.keycode;
		}
		return url;
	},
	// 点击加入圈子
	postJiaquan(uid,code){
		var url = DUIXIN_API + '&s=member&app=quan&c=jiaquan&m=index&api_auth_uid='+uid+'&api_auth_code='+code;
		return url;

	},
	// 选择圈子数据
	getXuanze_quan(){
		var url = DUIXIN_API + '&s=quan&c=quan&m=xuan_quan';
		return url;
	},
	// 发布数据
	//发布帖子
	postTiezi(uid,code,cid,tid) {
		var url = DUIXIN_API + '&s=member&app=quan&c=quantie&m=add&api_auth_uid='+uid+'&api_auth_code='+code+'&cid='+cid+'&tid='+tid;
		return url;
	},
	//发布九格图id
	getFabuid(){
		var url = DUIXIN_API + '&s=quan&c=fabu&m=fabuid';
		return url;
	},
	//上传图片多张
	postTupians(uid,code) {
		return DUIXIN_API+'s=api&c=file&m=upload&api_auth_uid='+uid+'&api_auth_code='+code+'&siteid=1';
	},
	// 隐藏帖子
	getYincang(uid,code){
		var url = DUIXIN_API + '&s=member&app=quan&c=edit&m=yincang&api_auth_uid='+uid+'&api_auth_code='+code;
		return url;
	},
	//删除帖子
	getDel_tie(uid,code){
		var url = DUIXIN_API + '&s=member&app=quan&c=edit&m=del&api_auth_uid='+uid+'&api_auth_code='+code;
		return url;
	},
	//修改帖子
	getEdit_tie(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=edit&m=edit&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	//修改帖子
	getEdit_yinpin(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=edit&m=edit_yinpin&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	//修改附件帖子
	getEdit_fujian(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=edit&m=edit_fujian&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 审核数量
	getShenhe_shu(uid,code){
		var url = DUIXIN_API + '&s=member&app=quan&c=shenhe&m=shenhe_count&api_auth_uid='+uid+'&api_auth_code='+code;
		return url;
	},

	// 审核列表
	getShenhe_list(obj) {
		var url = DUIXIN_API + '&s=member&app=quan&c=shenhe&m=index&pagesize=' + pageCount + '&page=' + obj.page + '&api_auth_uid='+obj.uid+'&api_auth_code='+obj.code;
		if (obj.categories!= 0) {
		  url += '&catid=' + obj.categories;
		}
		return url;
	},
	// 审核通过
	getShenhe_tong(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=shenhe&m=tong&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 审核拒绝
	getShenhe_jujue(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=shenhe&m=jujue&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 申请圈子
	postShenqing_quan(uid,code,catid){
		var url = DUIXIN_API + '&s=member&app=quan&c=home&m=add&api_auth_uid='+uid+'&api_auth_code='+code+'&catid='+catid;
		return url;
	},
	// 申请圈子列表
	getShenqing_uid_list(uid,code){
		var url = DUIXIN_API + '&s=member&app=quan&c=shenqing&m=index&api_auth_uid='+uid+'&api_auth_code='+code;
		return url;
	},
	// 修改圈子
	postEdit_quan(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=edit&m=edit_quan&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 添加进度
	postJindu(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=jindu&m=add&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 修改进度
	postJindu_xiugai(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=jindu&m=edit&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 删除进度
	postJindu_shanchu(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=jindu&m=jindu_index_shanchu&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 进度列表
	getJindu_data_list(uid,code,id){
		var url = DUIXIN_API + '&s=quan&c=jindu&m=jindu_data_list&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 添加进度详情
	postJindu_data_add(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=jindu&m=jindu_data_add&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 修改进度详情
	postJindu_data_xiugai(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=jindu&m=jindu_data_edit&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 删除进度详情
	postJindu_data_shanchu(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=jindu&m=jindu_data_del&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	// 购买
	postGoumai(uid,code,id){
		var url = DUIXIN_API + '&s=member&app=quan&c=quan_buy&m=index&api_auth_uid='+uid+'&api_auth_code='+code+'&id='+id;
		return url;
	},
	//首页热门圈子
	get_remen_quan(){
		var url = DUIXIN_API + '&s=quan&c=remen&m=index';
		return url;
	},
	//首页推荐圈子
	get_tuijian_quan(){
		var url = DUIXIN_API + '&s=quan&c=tuijian&m=index';
		return url;
	},
	//首页推荐帖子
	get_tuijian_tie(){
		var url = DUIXIN_API + '&s=quan&c=tuijian&m=tie';
		return url;
	},
	// 统计圈子收入
	get_uid_shouru(){
		var url = DUIXIN_API + '&s=member&app=quan&c=tongji&m=shouru';
		return url;
	},
	// 下载统计
	get_xiazai(){
		var url = DUIXIN_API + '&s=quan&c=xiazai_tongji&m=index';
		return url;
	},
	// 最新版本
	get_xinban(){
		var url = DUIXIN_API + '&s=quan&c=xiazai_tongji&m=xin';
		return url;
	},
	// 安装的软件
	get_app(){
		var url = DUIXIN_API + '&s=quan&c=app&m=index';
		return url;
	},
	// 积分列表
	get_payjifen_list(){
		var url = DUIXIN_API + '&s=payjifen&c=home&m=index';
		return url;
	},
	// 购买积分
	get_buy_jifen(uid,keycode){
		var url = DUIXIN_API + '&s=member&app=payjifen&c=buy&m=index&api_auth_uid='+uid+'&api_auth_code='+keycode;
		return url;
	},
	//post 购买积分
	post_buy_jifen(uid,keycode){
		var url = DUIXIN_API + '&s=member&app=payjifen&c=buy&m=index&api_auth_uid='+uid+'&api_auth_code='+keycode;
		return url;
	},
	//支付记录
	getPay_jilu(uid,keycode,mark,quanid){
		var url = DUIXIN_API + '&s=member&app=quan&c=quan_buy&m=pay&api_auth_uid='+uid+'&api_auth_code='+keycode+'&mark='+mark+'&quanid='+quanid;
		return url;
	},
	//直接拉起购买  member&c=pay
	post_payid(uid,keycode,id){
		var url = DUIXIN_API + '&s=member&c=pay&api_auth_uid='+uid+'&api_auth_code='+keycode+'&id='+id;
		return url;
	}

	

	
	



	
	
};